import { defineStore } from 'pinia';

export const mainStore = defineStore('main', {
    state: () => ({
        isCollapse: false,  // 默认值
        asideWidth: 200 // 存储数值而非字符串
    }),
    actions: {
        changeCollapse() {
            this.isCollapse = !this.isCollapse; // 切换状态
        },
        changeAsideWidth() {
            this.asideWidth = this.asideWidth === 200 ? 60 : 200; // 切换数值
        }
    }
});
